﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using Pos.Model;

namespace Pos.DAL
{
    public class EmployeeDAL
    {
        public Boolean CheckLogin(string Username, string Password)
        {
            Database db = new Database();
            SqlParameter[] param =
            {
                db.MakeInParam("@Username",SqlDbType.VarChar,50,Username),
                db.MakeInParam("@Password",SqlDbType.VarChar,50,Password)
            };
            try
            {

                return db.GetDataSet("POS_Emplyee_CheckLogin", param).Tables[0].Rows.Count == 1;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                db.Close();
            }
        }
    }
}
